﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wwtfly.LoggerUtility
{
    /// <summary>
    /// 日志管理
    /// </summary>
    public class LoggerManage
    {

        private static ILogger iLogger = new Log4NetLogger();
        /// <summary>
        /// info信息
        /// </summary>
        /// <param name="logMessageParams"></param>
        public static void Info(LogMessageParams logMessageParams)
        {
            iLogger.Info(logMessageParams);

        }
        /// <summary>
        /// Debug信息
        /// </summary>
        /// <param name="logMessageParams"></param>
        public static void Debug(LogMessageParams logMessageParams)
        {
            iLogger.Debug(logMessageParams);
        }

        /// <summary>
        /// Error信息
        /// </summary>
        /// <param name="logMessageParams"></param>
        public static void Error(LogMessageParams logMessageParams)
        {
            if (logMessageParams.Excep != null)
            {
                iLogger.Error(logMessageParams);
            }
            else
            {
                iLogger.Error(logMessageParams);

            }
        }
    }
}
